<%--
  Created by IntelliJ IDEA.
  User: SXYQ
  Date: 2020/12/16
  Time: 9:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/plugins/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/plugins/adminLTE/css/AdminLTE.css"/>
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/plugins/bootstrap/css/bootstrap.css"/>
    <style>
        .layui-form-checkbox[lay-skin="primary"] {
            top: 50%;
            transform: translateY(-50%);
        }

        .layui-tab-title li {
            text-align: right;
        }

        .icon {
            width: 1em;
            height: 1em;
            vertical-align: -0.15em;
            fill: currentColor;
            overflow: hidden;
        }

        #container {
            width: 100%;
            height: 100%;
        }

        .my-card-body {
            height: 49%;
            padding-top: 10px;
        }

        .asd {
            border: solid 1px;
            height: 47%;
            padding: 1px;
        }

        #up-map-div {

            width: 120px;
            height: 30px;
            top: 10px;
            right: 1px;
            position: absolute;
            z-index: 9999;
            background: transparent;
        }

        #up-map-div2 {

            width: 120px;
            height: 20px;
            top: 30px;
            right: 20px;
            position: absolute;
            z-index: 9999;
            background: transparent;
        }

        #kaishi {
            width: 220px;
            height: 50px;
            top: 50%;
            right: 45%;
            position: absolute;
            z-index: 9999;
            background: rgba(0, 0, 0, .6);
            text-align: center;
            line-height: 50px;
            display: none;
        }

        #cdiv {

            width: 100%;
            text-align: center;
            height: 50px;
            line-height: 50px;
            background: rgba(0, 0, 0, .7);
            position: absolute;
            z-index: 9999999;
            left: 0;
            bottom: 0px;
        }

        #beisu {
            display: none;
            width: 70px;
            text-align: center;
            height: 150px;
            line-height: 50px;
            background: rgba(0, 0, 0, .7);
            position: absolute;
            z-index: 9999999;
            right: 40%;
            bottom: 55px;
        }

        a:link {
            text-decoration: none;
        }

        /* 指正常的未被访问过的链接*/

        a:visited {
            text-decoration: none;
        }

        /*指已经访问过的链接*/

        a:hover {
            text-decoration: none;
        }

        /*指鼠标在链接*/

        a:active {
            text-decoration: none;
        }

        /*layui数据表格自动换行*/
        .layui-table-cell {
            font-size: 14px;
            padding: 0 5px;
            height: auto;
            overflow: visible;
            text-overflow: inherit;
            white-space: normal;
            word-break: break-all;
        }

        /*更改layui原生样式*/
        .layui-layout-admin .layui-body {
            bottom: 0px;
        }

        .layui-show {
            height: 100%;
        }

        /*   .layui-table th .layui-table-cell{
               height:auto;
               overflow:visible;
               text-overflow:inherit;
               white-space:normal;
           }
           #typeList > div > div > div.layui-table-box > div.layui-table-fixed.layui-table-fixed-l{
               display:none
           }*/
        /* 指正在点的链接*/
        /*作用于数据表格列固定*/
        /*   .layui-table-fixed .layui-table-body {
               height: auto !important;
           }

           .layui-table-fixed.layui-hide {
               display: block !important;
           }*/
    </style>
</head>
<body>
<div class="layui-tab" lay-filter="tab-all" lay-allowClose="true"
     style="height: 99.5%;margin-top: 0px;margin-bottom: 0px">
    <ul class="layui-tab-title" style="margin-bottom: 0px">
        <li data-status="1" class="layui-this" lay-id="1">运行状况</li>
        <li data-status="2" lay-id="2">历史数据</li>
        <li data-status="3" lay-id="3">报警信息</li>
        <li data-status="4" lay-id="4">信息状态</li>
        <li data-status="5" lay-id="5">作业成效</li>
    </ul>
    <div class="layui-tab-content" style=" background-color: #F2F2F2;height: 95%">
        <%--  历史回放--%>
        <div id="fdiv" class="layui-tab-item layui-show">
            <div id="kaishi">
                <span style="color: #fff;font-size: 24px"></span>
            </div>
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md4">
                    <div class="layui-card ">
                        <div class="layui-card-body my-card-body">
                            <div class="layui-col-md12">
                                <div class="layui-card ">
                                    <div class="layui-card-body ">
                                        <span style="font-size: 20px;font-weight: 700;color: #333;">暂无作业</span>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-md12">
                                <div class="layui-card ">
                                    <div class="layui-card-body ">
                                        <div class="layui-col-md9">
                                            <div class="layui-card ">
                                                <div class="layui-card-body ">
                                                    <span><b>双头搅拌桩记录仪16号(已撤场)</b></span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-md3">
                                            <div class="layui-card ">
                                                <div class="layui-card-body "
                                                     style=" text-align: center;line-height:19%;padding-left: 0px;padding-right: 0px">
                                                    <span style="font-size: 10px;color: #999;">喷浆中</span> <img
                                                        id="deng1" src="/img/zhishidengh.png">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-md9">
                                            <div class="layui-card ">
                                                <div class="layui-card-body ">
                                                    <span style="font-size: 10px;color: #999;">  暂无产品名称</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-md3">
                                            <div class="layui-card ">
                                                <div class="layui-card-body "
                                                     style=" text-align: center;line-height:19%;padding-left: 0px;padding-right: 0px">
                                                    <span style="font-size: 10px;color: #999;">记录中</span> <img
                                                        id="deng2" src="/img/zhishidengh.png">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-md12">
                                <div class="layui-card ">
                                    <div class="layui-card-body ">
                                        <div><img
                                                src="/img/lianxiren.png">&nbsp;&nbsp;&nbsp;<span
                                                style="font-size: 10px;color: #999;">未绑定</span></div>
                                        <div><img
                                                src="/img/dianhua.png">&nbsp;&nbsp;&nbsp;<span
                                                style="font-size: 10px;color: #999;">暂无联系方式</span></div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-md12">
                                <div class="layui-card ">
                                    <div class="layui-card-body "
                                         style="background-color: #F8FEFE; text-align: center;line-height:70px">
                                        <span>历史回放中</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-card">
                        <div class="layui-card-body my-card-body ">
                            <div class="layui-col-md12">
                                <div class="layui-card">
                                    <div class="layui-card-body"
                                         style="height: 17px;padding-top: 0px;padding-bottom: 3px">
                                        <b>段灰量(kg)、电流(A)变化曲线</b>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-card">
                                    <div class="layui-card-body  asd">
                                        <div id="runInHole" style="width:100%;height:100%;"></div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-card">
                                    <div class="layui-card-body  asd">
                                        <div id="runOnHole" style="width:100%;height:100%;"></div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-card">
                                    <div class="layui-card-body asd">
                                        333
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-card">
                                    <div class="layui-card-body  asd">
                                        444
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-col-md4">
                    <div class="layui-card">
                        <div class="layui-card-body my-card-body">
                            <div id="container"></div>
                            <div id="up-map-div">
                                <div class="layui-inline" id="img">
                                    <img id="img1" src="/img/luxiang%20.png">
                                </div>
                                <span class="layui-inline" style="color: red;font-size: 20px">REPLAY</span>
                            </div>
                            <div id="up-map-div2">
                                <span style="color: red;font-size: 12px">  2012-02-03 12:23:02</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4" style="padding-bottom: 0px">
                    <div class="layui-card">
                        <div class="layui-card-body my-card-body">
                            <div class="layui-col-md6">

                                <div class="layui-card-body " style="height: 50%;padding: 0px">
                                    <div id="depth" style="width:100%;height:100%;"></div>

                                </div>

                            </div>
                            <div class="layui-col-md6">

                                <div class="layui-card-body " style="height: 50%;padding: 0px">
                                    <div id="speed" style="width:100%;height:100%;"></div>
                                </div>

                            </div>
                            <div class="layui-col-md6">

                                <div class="layui-card-body " style="height: 50%;padding: 0px">
                                    <div id="flow" style="width:100%;height:100%;"></div>
                                </div>

                            </div>
                            <div class="layui-col-md6">

                                <div class="layui-card-body " style="height: 50%;padding: 0px">
                                    <div id="electricity" style="width:100%;height:100%;"></div>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md8">
                    <div class="layui-card">
                        <div class="layui-card-body my-card-body">
                        </div>
                    </div>
                </div>
            </div>

            <div id="cdiv">
                <svg id="chongbo" class="icon" aria-hidden="true" style="color:white;font-size: 32px">
                    <use xlink:href="#icon-zhongbo"></use>
                </svg>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <i id="bofang" class="layui-icon layui-icon-pause" style="font-size: 30px; color: white"></i>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <svg id="tingzhi" class="icon" aria-hidden="true" style="color:white;font-size: 30px">
                    <use xlink:href="#icon-tingzhi"></use>
                </svg>
                <div id="zhengchang" class="layui-input-inline" style=" float: right;right:41%;font-size: 20px">
                    <input id="h1" value="4000" type="hidden">
                    <span><a href="javascript:void(0);" style="color: white">正常</a></span>
                </div>
                <div id="beisu">
                    <ul>
                        <li id="a1" value="3000"><a href="javascript:void(0);"
                                                    style="font-size: 16px;color:#58FA58">正常</a></li>
                        <li id="a2" value="1000"><a href="javascript:void(0);"
                                                    style="font-size: 16px;color:white">快速</a></li>
                        <li id="a3" value="100"><a href="javascript:void(0);" style="font-size: 16px;color:white">急速</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <%--  历史回放--%>
        <div class="layui-tab-item">
            <div class="site-text" style="margin: 5%; display: none" id="filtrateWindow">
                <div class="layui-form-item" style="margin-bottom: 0px">
                    <div class="layui-inline" style="height: 50px;">
                        <label class="layui-form-label" style="width: 120px;height: 50px;padding: 5px">施工桩长(m)</label>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="pileLength" id="pileLength" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid">-</div>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="pileLength2" id="pileLength2" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item" style="margin-bottom: 0px">
                    <div class="layui-inline">
                        <label class="layui-form-label"
                               style="width: 120px;height: 50px;padding: 5px">平均灰量(kg/m)</label>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="aol" id="aol" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid">-</div>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="aol2" id="aol2" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item" style="margin-bottom: 0px">
                    <div class="layui-inline">
                        <label class="layui-form-label " style="width: 120px;height: 50px;padding: 5px">最大电流(A)</label>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="currentMax" id="currentMax" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid">-</div>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="currentMax2" id="currentMax2" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item" style="margin-bottom: 0px">
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width: 120px;height: 50px;padding: 5px">成桩时间(s)</label>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="pileTime" id="pileTime" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid">-</div>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="pileTime2" id="pileTime2" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item" style="margin-bottom: 0px">
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width: 120px;height: 50px;padding: 5px">桩长偏差(m)</label>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="price_min" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid">-</div>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="price_max" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width: 120px;height: 50px;padding: 5px">质量评级</label>
                        <div class="layui-input-inline" style="width: 100px;">
                            <select class="form-control" style="width: 150px" name="grade">
                                <option selected value="">--请选择--</option>
                                <option value="A">A</option>
                                <option value="B">B</option>
                                <option value="C">C</option>
                                <option value="D">D</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <div class="demoTable ">
                <div class="layui-form layui-card-header layuiadmin-card-header-auto" id="resetForm">
                    <%--<div class="layui-form-item">--%>
                    <div class="layui-inline" style="width: 100px">
                        <select name="state" id="state">
                            <option value="" layui-hide>预警状态</option>
                            <option value="1">正常</option>
                            <option value="0">预警</option>
                        </select>
                    </div>


                    <div class="layui-input-inline">
                        <input type="text" autocomplete="off" class="layui-input" id="start" name="start"
                               placeholder="开始日期">
                    </div>
                    <div class="layui-input-inline">
                        <input type="text" autocomplete="off" class="layui-input" id="end" name="end"
                               placeholder="结束日期">
                    </div>
                    <div class="layui-inline">
                        <input class="layui-input" autocomplete="off" name="stakeMark" id="stakeMark"
                               placeholder="请输入桩号">

                    </div>

                    <button class="layui-btn layui-btn-primary  layui-btn-sm" data-type="reload">搜索</button>
                    <button class="layui-btn layui-btn-primary  layui-btn-sm" id="reset">重置</button>
                    <button class="layui-btn layui-btn-primary  layui-btn-sm" id="aa">切换标签</button>
                    <div class="layui-btn layui-btn-primary layui-btn-sm" id="filter">筛选</div>

                    <%--</div>--%>
                </div>
            </div>
            <table class="layui-hide" id="historicalTable" lay-filter="historicalTable">

            </table>
            <script type="text/html" id="barDemo">
                <a class="layui-btn layui-btn-xs" lay-event="edit">详情</a>
                <a class="layui-btn layui-btn-normal  layui-btn-xs" lay-event="replay">回放</a>
                <a class="layui-btn layui-btn-warm  layui-btn-xs" lay-event="parameter">参数</a>
            </script>
        </div>
        <div class="layui-tab-item">
            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief1">
                <ul class="layui-tab-title" style="margin-bottom: 0px">
                    <li class="layui-this" lay-id="6" style="margin-bottom: 0px">历史报警</li>
                    <li lay-id="7">报警分析</li>
                </ul>
                <div class="layui-tab-content" style="height: 100px;">
                    <div class="layui-tab-item layui-show">
                        <div class="demoTable ">
                            <div class="layui-form layui-card-header layuiadmin-card-header-auto" id="resetForm1">

                                <div class="layui-inline">
                                    <input class="layui-input" autocomplete="off" name="stakeMark" id="stakeMark1"
                                           placeholder="请输入桩号">

                                </div>

                                <div class="layui-input-inline">
                                    <input type="text" autocomplete="off" class="layui-input" id="start1" name="start"
                                           placeholder="开始日期">
                                </div>
                                <div class="layui-input-inline">
                                    <input type="text" autocomplete="off" class="layui-input" id="end1" name="end"
                                           placeholder="结束日期">
                                </div>


                                <button class="layui-btn layui-btn-primary  layui-btn-sm" data-type="reload">搜索</button>
                                <button class="layui-btn layui-btn-primary  layui-btn-sm" id="reset">重置</button>
                                <table class="layui-hide" id="warningTable" lay-filter="warningTable">

                                </table>
                                <%--</div>--%>
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab-item">
                        <div class="demoTable ">
                            <div class="layui-form layui-card-header layuiadmin-card-header-auto" id="resetForm2">
                                <%--<div class="layui-form-item">--%>


                                <div class="layui-inline">
                                    <input class="layui-input" autocomplete="off" name="stakeMark" id="stakeMark2"
                                           placeholder="请输入桩号">
                                </div>
                                <div class="layui-input-inline">
                                    <input type="text" autocomplete="off" class="layui-input" id="start2" name="start"
                                           placeholder="开始日期">
                                </div>
                                <div class="layui-input-inline">
                                    <input type="text" autocomplete="off" class="layui-input" id="end2" name="end"
                                           placeholder="结束日期">
                                </div>


                                <button class="layui-btn layui-btn-primary  layui-btn-sm" data-type="reload">搜索</button>
                                <button class="layui-btn layui-btn-primary  layui-btn-sm" id="reset">重置</button>
                                <div style="text-align: right">
                                    <b>统计总数</b> <span>0</span>
                                </div>
                                <%--</div>--%>
                            </div>
                        </div>

                    </div>
                </div>
            </div>

        </div>
        <div class="layui-tab-item">
            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief2">
                <ul class="layui-tab-title">
                    <li class="layui-this" lay-id="8">历史状态</li>
                    <li lay-id="9">实时状态</li>
                </ul>
                <div class="layui-tab-content" style="height: 100px;">
                    <div class="layui-tab-item layui-show">
                        <div class="demoTable ">
                            <div class="layui-form layui-card-header layuiadmin-card-header-auto" id="resetForm3">
                                <div class="layui-input-inline">
                                    <input type="text" autocomplete="off" class="layui-input" id="start3" name="start"
                                           placeholder="开始日期">
                                </div>
                                <div class="layui-input-inline">
                                    <input type="text" autocomplete="off" class="layui-input" id="end3" name="end"
                                           placeholder="结束日期">
                                </div>


                                <button class="layui-btn layui-btn-primary  layui-btn-sm" data-type="reload">搜索</button>
                                <button class="layui-btn layui-btn-primary  layui-btn-sm" id="reset">重置</button>
                                <table class="layui-hide" id="historyStateTable" lay-filter="historyStateTable">

                                </table>
                                <%--</div>--%>
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab-item">
                        <div class="demoTable ">
                            <div class="layui-form layui-card-header layuiadmin-card-header-auto" id="resetForm4">
                                <%--<div class="layui-form-item">--%>

                                <div class="layui-input-inline">
                                    <input type="text" autocomplete="off" class="layui-input" id="start4" name="start"
                                           placeholder="开始日期">
                                </div>
                                <div class="layui-input-inline">
                                    <input type="text" autocomplete="off" class="layui-input" id="end4" name="end"
                                           placeholder="结束日期">
                                </div>


                                <button class="layui-btn layui-btn-primary  layui-btn-sm" data-type="reload">搜索</button>
                                <button class="layui-btn layui-btn-primary  layui-btn-sm" id="reset">重置</button>
                                <%--</div>--%>
                                <table class="layui-hide" id="timeStateTable" lay-filter="timeStateTable">

                                </table>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
        <div class="layui-tab-item">

            <div class="demoTable ">
                <div class="layui-form layui-card-header layuiadmin-card-header-auto" id="resetForm5">
                    <div class="layui-input-inline">
                        <input type="text" autocomplete="off" class="layui-input" id="start5" name="start"
                               placeholder="开始日期">
                    </div>
                    <div class="layui-input-inline">
                        <input type="text" autocomplete="off" class="layui-input" id="end5" name="end"
                               placeholder="结束日期">
                    </div>


                    <button class="layui-btn layui-btn-primary  layui-btn-sm" data-type="reload">搜索</button>
                    <button class="layui-btn layui-btn-primary  layui-btn-sm" id="reset">重置</button>
                    <table class="layui-hide" id="workTable" lay-filter="workTable">

                    </table>
                    <%--</div>--%>
                </div>
            </div>

        </div>
    </div>
</div>

<script src="${pageContext.request.contextPath}/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="${pageContext.request.contextPath}/js/echarts.min.js" type="text/javascript" charset="utf-8"></script>
<script src="${pageContext.request.contextPath}/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/jQueryUI/jquery-ui.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/layui/layui.js" charset="utf-8"></script>
<!-- 这里要配置参数key,将其值设置为高德官网开发者获取的key -->
<script src="http://webapi.amap.com/maps?v=1.3&key=d0533d004d93f60c12ceff402c577627"></script>
<%--<script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>--%>
<script type="text/javascript" src="${pageContext.servletContext.contextPath}/js/jquery-migrate-1.0.0.js"></script>
<script type="text/javascript" src="${pageContext.servletContext.contextPath}/js/iconfont.js"></script>
</body>
<script src="${pageContext.request.contextPath}/js/playback.js" charset="utf-8"></script>
<script src="${pageContext.request.contextPath}/plugins/adminLTE/js/app.min.js"></script>

</body>
<script>
    /*echarts图表配置*/
    var runInHole = echarts.init(document.getElementById('runInHole'));
    var runOnHole = echarts.init(document.getElementById('runOnHole'));
    var depth = echarts.init(document.getElementById('depth'));
    var speed = echarts.init(document.getElementById('speed'));
    var flow = echarts.init(document.getElementById('flow'));
    var electricity = echarts.init(document.getElementById('electricity'));
    // 指定图表的配置项和数据 下钻图表
    var runInHoleOption = {
        title: {
            text: '下钻',
            left: 'left',
            textStyle: { //主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
                fontFamily: 'Arial, Verdana, sans...',
                fontSize: 10,
                fontStyle: 'normal',
                fontWeight: 'normal'
            }
        },
        grid: {//设置表格的外边距
            left: '3%',
            right: '3%',
            top: '11%',
            bottom: '3%',
            containLabel: true
        },

        tooltip: {
            trigger: 'axis',
            axisPointer:
                {axis: 'y'}//设置提示框根据横轴选择数据
        },
        formatter: function (params, ticket, callback) {//自定义显示提示框内容
            var htmlStr = '';
            for (var i = 0; i < params.length; i++) {
                var param = params[i];
                var xName = param.name;//x轴的名称
                var seriesName = param.seriesName;//图例名称
                var value = param.value;//y轴值
                var color = param.color;//图例颜色
                if (i === 0) {
                    htmlStr += xName + '<br/>';//x轴的名称
                    htmlStr += '<div>';
                    htmlStr += '深度(米):' + value[1] + '</br>';
                    //为了保证和原来的效果一样，这里自己实现了一个点的效果
                    htmlStr += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + color + '"></span>';
                    //圆点后面显示的文本
                    htmlStr += seriesName + '(kg)：' + value[0];
                    htmlStr += '</div>';
                } else {
                    /*   htmlStr += xName + '<br/>';//x轴的名称 */
                    htmlStr += '<div>';
                    //为了保证和原来的效果一样，这里自己实现了一个点的效果
                    htmlStr += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + color + '"></span>';
                    //圆点后面显示的文本
                    htmlStr += seriesName + '(A)：' + value[0];
                    htmlStr += '</div>';
                }
            }
            return htmlStr;
        },
        dataZoom: [
            /*{
                show: true,
                realtime: true,
                start: 0,
                end: 30
            },*/
            {
                type: 'inside',
                realtime: true,
                start: 0,
                end: 60
            }
        ],
        xAxis: {
            type: 'value',
            interval: 10, // 步长
            position: 'top',//设置x轴刻度在上方显示
            min: 0, // 起始
            max: 60, // 终止
            splitLine: {
                show: false//设置只显示横向网格
            }
        },
        yAxis: {
            type: 'value',
            inverse: true,//y轴反转
            interval: 5, // 步长
            min: 0, // 起始
            max: 30 // 终止

        },
        series: [{
            name: '浆量',
            data: [/*[6.17,1.01],[5.57,1.11],[5.46,1.23],[3.58,1.34],[1.72,3.62],[7.97,4.30]*/],
            type: 'line',
            // symbol: 'none',  //取消折点圆圈
            itemStyle: {
                color: '#F86969'//设置折线颜色
            }
        }, {
            name: '电流',
            data: [/*[0.89,1.01],[0.91,1.11],[0.90,1.23],[0.92,1.34],[0.89,3.62],[0.90,4.30]*/],
            type: 'line',
            // symbol: 'none',  //取消折点圆圈
            itemStyle: {
                color: '#60D0FF'//设置折线颜色
            }
        }]
    };
    var runOnHoleOption = {
        title: {
            text: '提钻',
            left: 'left',
            textStyle: { //主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
                fontFamily: 'Arial, Verdana, sans...',
                fontSize: 10,
                fontStyle: 'normal',
                fontWeight: 'normal'
            },
        },
        grid: {//设置表格的外边距
            left: '3%',
            right: '3%',
            top: '11%',
            bottom: '3%',
            containLabel: true
        },

        tooltip: {
            trigger: 'axis',
            axisPointer:
                {axis: 'y'}//设置提示框根据横轴选择数据
        },
        formatter: function (params, ticket, callback) {//自定义显示提示框内容
            var htmlStr = '';
            for (var i = 0; i < params.length; i++) {
                var param = params[i];
                var xName = param.name;//x轴的名称
                var seriesName = param.seriesName;//图例名称
                var value = param.value;//y轴值
                var color = param.color;//图例颜色
                if (i === 0) {
                    htmlStr += xName + '<br/>';//x轴的名称
                    htmlStr += '<div>';
                    htmlStr += '深度(米):' + value[1] + '</br>';
                    //为了保证和原来的效果一样，这里自己实现了一个点的效果
                    htmlStr += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + color + '"></span>';
                    //圆点后面显示的文本
                    htmlStr += seriesName + '(kg)：' + value[0];
                    htmlStr += '</div>';
                } else {
                    /*   htmlStr += xName + '<br/>';//x轴的名称 */
                    htmlStr += '<div>';
                    //为了保证和原来的效果一样，这里自己实现了一个点的效果
                    htmlStr += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + color + '"></span>';
                    //圆点后面显示的文本
                    htmlStr += seriesName + '(A)：' + value[0];
                    htmlStr += '</div>';
                }
            }
            return htmlStr;
        },
        dataZoom: [
            {
                type: 'inside',
                realtime: true,
                start: 0,
                end: 60
            }
        ],
        xAxis: {
            type: 'value',
            interval: 10, // 步长
            position: 'top',//设置x轴刻度在上方显示
            min: 0, // 起始
            max: 60, // 终止
            splitLine: {
                show: false//设置只显示横向网格
            }
        },
        yAxis: {
            type: 'value',
            inverse: true,//y轴反转
            interval: 5, // 步长
            min: 0, // 起始
            max: 30 // 终止

        },
        series: [{
            name: '浆量',
            data: [/*[6.17,1.01],[5.57,1.11],[5.46,1.23],[3.58,1.34],[1.72,3.62],[7.97,4.30]*/],
            type: 'line',
            // symbol: 'none',  //取消折点圆圈
            itemStyle: {
                color: '#F86969'//设置折线颜色
            }
        }, {
            name: '电流',
            data: [/*[0.89,1.01],[0.91,1.11],[0.90,1.23],[0.92,1.34],[0.89,3.62],[0.90,4.30]*/],
            type: 'line',
            // symbol: 'none',  //取消折点圆圈
            itemStyle: {
                color: '#60D0FF'//设置折线颜色
            }
        }]
    };
    //深度图表
    var depthOption = {
        title: [{
            text: '深度(m)',
            x: 'center',//居中
            y: '135',//底部
            textStyle: { //主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
                fontSize: 14,
                fontStyle: 'normal',
                fontWeight: 'normal'
            }
        }, {
            text: '',
            subtext: '0米',//副标题
            left: 57,
            top: 1
        }],
        grid: {//设置表格的外边距
            left: '3%',
            right: '3%',
            top: '5%',
            bottom: '13%',
            containLabel: true
        },
        xAxis: {
            type: 'category',
            splitLine: {
                show: false//设置只显示横向网格
            },
            axisLine: {
                show: false//取消显示坐标轴
            }
        },
        yAxis: {
            type: 'value',
            inverse: true,//y轴反转
            min: 0,
            max: 30,
            splitLine: {
                show: false//设置只显示横向网格
            },
            axisLabel: {
                show: false//隐藏坐标轴
            }

        },
        series: [{
            data: [0],
            type: 'bar',
            showBackground: true,
            barWidth: 30,//柱图宽度,
            color: '#60D0FF',
            backgroundStyle: {
                color: 'rgba(180, 180, 180, 0.2)'
            },
            itemStyle: {
                normal: {
                    label: {
                        show: true,  //开启显示
                        position: 'right',  //在右方显示
                        textStyle: {  //数值样式
                            color: '#60D0FF',
                            fontSize: 16
                        }
                    }
                }
            }
        }]
    };
    //速度图表
    var speedOption = {
        title: {
            text: '速度(cm/min)',
            x: 'center',//居中
            y: '135',//底部
            textStyle: { //主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
                fontSize: 14,
                fontStyle: 'normal',
                fontWeight: 'normal'
            }
        },

        series: [{
            radius: '100%',//设置表盘大小
            name: 'Pressure',
            type: 'gauge',
            min: 0,
            max: 250,
            splitNumber: 4,
            axisLine: {            // 坐标轴线
                lineStyle: {       // 属性lineStyle控制线条样式
                    color: [[1, '#60D0FF']],
                    width: 3
                }
            },
            itemStyle: {
                color: '#60D0FF'
                // width:35
            },
            axisTick: {
                show: false
            },
            splitLine: {
                show: false
            },
            axisLabel: {
                distance: -15,
                fontSize: 10
            },

            detail: {
                valueAnimation: true,
                textStyle: {
                    fontSize: 16
                },
                offsetCenter: [0, '60%'],
                formatter: '{value}'
            },
            data: [0]
        }]
    };
    //流量图表
    var flowOption = {
        title: {
            text: '流量(L/min)',
            x: 'center',//居中
            y: '135',//底部
            textStyle: { //主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
                fontSize: 14,
                fontStyle: 'normal',
                fontWeight: 'normal'
            }
        },

        series: [{
            radius: '100%',//设置表盘大小
            name: 'Pressure',
            type: 'gauge',
            min: 0,
            max: 100,
            splitNumber: 5,
            axisLine: {            // 坐标轴线
                lineStyle: {       // 属性lineStyle控制线条样式
                    color: [[1, '#60D0FF']],
                    width: 3
                }
            },
            itemStyle: {
                color: '#60D0FF'
                // width:35
            },
            axisTick: {
                show: false
            },
            splitLine: {
                show: false
            },
            axisLabel: {
                distance: -15,
                fontSize: 10
            },

            detail: {
                valueAnimation: true,
                textStyle: {
                    fontSize: 16
                },
                offsetCenter: [0, '60%'],
                formatter: '{value}'
            },
            data: [0]
        }]
    };
    //电流图表
    var electricityOption = {
        title: {
            text: '电流(A)',
            x: 'center',//居中
            y: '135',//底部
            textStyle: { //主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
                fontSize: 14,
                fontStyle: 'normal',
                fontWeight: 'normal'
            }
        },
        series: [{
            radius: '100%',//设置表盘大小
            name: 'Pressure',
            type: 'gauge',
            min: 0,
            max: 250,
            splitNumber: 4,
            axisLine: {            // 坐标轴线
                lineStyle: {       // 属性lineStyle控制线条样式
                    color: [[1, '#60D0FF']],
                    width: 3
                }
            },
            itemStyle: {
                color: '#60D0FF'
                // width:35
            },
            axisTick: {
                show: false
            },
            splitLine: {
                show: false
            },
            axisLabel: {
                distance: -15,
                fontSize: 10
            },

            detail: {
                valueAnimation: true,
                textStyle: {
                    fontSize: 16
                },
                offsetCenter: [0, '60%'],
                formatter: '{value}'
            },
            data: [0]
        }]
    };
    // 使用刚指定的配置项和数据显示图表。
    runInHole.setOption(runInHoleOption);
    runOnHole.setOption(runOnHoleOption);
    depth.setOption(depthOption);
    speed.setOption(speedOption);
    flow.setOption(flowOption);
    electricity.setOption(electricityOption);

    /*高德地图*/
    var map = new AMap.Map('container', {
        resizeEnable: true,
        zoom: 4,
        center: [114.384129, 30.508543],
        mapStyle: 'amap://styles/ac617ee5ac942dc438bc8ae1b99b7939',
        viewMode: '3D', //开启3D视图,默认为关闭
        buildingAnimation: true //楼块出现是否带动画
        //前往创建自定义地图样式：https://lbs.amap.com/dev/mapstyle/index
    });

    var details;
    var playback;

    //父页面传入的参数
    function child(obj) {
        layui.use(['table', 'form', 'element', 'laydate'], function () {
            /*       console.log(obj.device_code);
                   console.log(obj.state);*/
            var $ = layui.jquery
                , element = layui.element;
            var table = layui.table;
            var form = layui.form;
            var laydate = layui.laydate;

            //日期时间选择器
            laydate.render({
                elem: '#start'
                , type: 'datetime'
            });
            laydate.render({
                elem: '#end'
                , type: 'datetime'
            });
            //初次进入页面,判断设备state,如果正在运行中,则提取实时数据,如果为其他,则标明

            // var msg;//设备状态
            // var endmsg;//播放结束
            // var pause;//暂停播放
            var tab = true;//用于切换标签暂停ajax线程

            if (obj.state == 0) {
          /*      msg = layer.msg('<span style="font-size:24px">设备未激活</span>', {
                    time: '-1',
                    area: '300px'
                })*/
                $("#kaishi").find("span").text("设备未激活");
                $("#kaishi").css({"display":"block"});
            } else if (obj.state == 1) {
           /*     msg = layer.msg('<span style="font-size:24px">设备已离线</span>', {
                    time: '-1',
                    area: '300px'
                })*/
                $("#kaishi").find("span").text("设备已离线");
                $("#kaishi").css({"display":"block"});
            } else if (obj.state == 2) {
          /*      msg = layer.msg('<span style="font-size:24px">设备已离场</span>', {
                    time: '-1',
                    area: '300px'
                })*/
                $("#kaishi").find("span").text("设备已离场");
                $("#kaishi").css({"display":"block"});
            } else if (obj.state == 4) {
             /*   msg = layer.msg('<span style="font-size:24px">设备故障中</span>', {
                    time: '-1',
                    area: '300px'
                })*/
                $("#kaishi").find("span").text("设备故障中");
                $("#kaishi").css({"display":"block"});
            } else if (obj.state == 3) {
                // console.log(tab);
                initplayback(obj.device_code);
            }

            //Hash地址的定位
            /*       var layid = location.hash.replace(/^#test=/, '');
                   element.tabChange('tab-all', layid);*/
            // 监听tab切换 操作：文档 - 内置模块 - 常用元素操作 element - 监听tab切换
            element.on('tab(tab-all)', function (data) {

                // console.log(this);        // 当前Tab标题所在的原始DOM元素
                // console.log(data.index);  // 得到当前Tab的所在下标
                // console.log(data.elem);   // 得到当前的Tab大容器
                // historicalTable.resize('historicalTable');
                var layid = $(this).attr('lay-id');
                //切换tab页关闭历史回放的msg
               /* layer.close(msg);
                layer.close(endmsg);*/
                // layer.close(pause);
                var bfclass = $("#bofang").attr('class');//获得播放的class,用于判断播放暂停状态
                if (layid == 1) {
                    if (obj.state == 0) {
                   /*     var msg = layer.msg('<span style="font-size:24px">设备未激活</span>', {
                            time: '-1',
                            area: '300px'
                        })*/
                        $("#kaishi").find("span").text("设备未激活");
                        $("#kaishi").css({"display":"block"});
                    } else if (obj.state == 1) {
                      /*  var msg = layer.msg('<span style="font-size:24px">设备已离线</span>', {
                            time: '-1',
                            area: '300px'
                        });*/
                    } else if (obj.state == 2) {
                  /*      var msg = layer.msg('<span style="font-size:24px">设备已离场</span>', {
                            time: '-1',
                            area: '300px'
                        })*/
                        $("#kaishi").find("span").text("设备已离场");
                        $("#kaishi").css({"display":"block"});
                    } else if (obj.state == 4) {
                     /*   var msg = layer.msg('<span style="font-size:24px">设备故障中</span>', {
                            time: '-1',
                            area: '300px'
                        })*/
                        $("#kaishi").find("span").text("设备故障中");
                        $("#kaishi").css({"display":"block"});
                    } else if (obj.state == 3) {

                     /*   if (bfclass.indexOf("layui-icon-play") != -1) {
                            //条件为true时,说明为播放键,当前为暂停状态
                            pause = layer.msg('<span style="font-size:24px">暂停</span>', {
                                time: '-1',
                                area: '200px'
                            });
                        }
                        if (endmsg) {
                            //如果endmsg不为空,则说明播放已结束,重新将播放结束弹出
                            endmsg = layer.msg('<span style="font-size:24px">播放结束</span>', {
                                time: '-1',
                                area: '300px'
                            });
                        }*/
                        /*else {
                                                    runInHoleOption.series[0].data = [];
                                                    runInHoleOption.series[1].data = [];
                                                    runOnHoleOption.series[0].data = [];
                                                    runOnHoleOption.series[1].data = [];
                                                    depthOption.series[0].data = [];
                                                    speedOption.series[0].data = [];
                                                    flowOption.series[0].data = [];
                                                    electricityOption.series[0].data = [];
                                                    runInHole.setOption(runInHoleOption);
                                                    runOnHole.setOption(runOnHoleOption);
                                                    depth.setOption(depthOption);
                                                    speed.setOption(speedOption);
                                                    flow.setOption(flowOption);
                                                    electricity.setOption(electricityOption);
                                                    tab = true;
                                                    initplayback(obj.device_code);
                                                }*/
                        // console.log(layid);

                    }
                } else if (layid == 2) {
                    //回放
                    $("#aa").click(function () {
                        element.tabAdd('tab-all', {
                            title: '选项卡的标题'
                            , content: '选项卡的内容' //支持传入html
                            , id: '10'
                        });
                    });

                    table.render({
                        elem: '#historicalTable'
                        , url: '/cement/findAll.do'
                        , skin: 'nob'//样式格式
                        // ,even:false
                        // , size: 'sm'//小型表格
                        , toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板
                        , defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义，去除该参数即可
                            title: '提示'
                            , layEvent: 'LAYTABLE_TIPS'
                            , icon: 'layui-icon-refresh'
                        }]
                        , totalRow: true
                        , title: '生产记录'
                        , cols: [[
                            {type: 'checkbox', field: 'checkbox'/*, fixed: 'left'*/}
                            // , {field: 'id', title: 'ID', width: 80, fixed: 'left', unresize: true, sort: true}
                            , {
                                field: 'device_code',
                                title: '设备编号',
                                hide: true,
                                width: 120,
                                edit: 'text',
                                align: "center"
                            }
                            , {
                                field: 'pile_driver_num',
                                title: '桩机号',
                                hide: true,
                                width: 120,
                                edit: 'text',
                                align: "center"
                            }
                            , {field: 'stake_mark', title: '桩号', width: 148, align: "center"}
                            , {
                                field: 'start_date',
                                align: "center",
                                title: '开始时间',
                                width: 90,
                                edit: 'text',
                                templet: "<div>{{layui.util.toDateString(d.start_date, 'yyyy-MM-dd HH:mm:ss')}}</div>"
                            }
                            , {
                                field: 'end_date',
                                align: "center",
                                title: '结束时间',
                                width: 90,
                                edit: 'text',
                                templet: "<div>{{layui.util.toDateString(d.end_date, 'yyyy-MM-dd HH:mm:ss')}}</div>"
                            }
                            , {field: 'pile_length', title: '施工桩长(m)', width: 100, edit: 'text', align: "center"}
                            , {field: 'au_aol', title: '累计灰量(kg)', width: 100, edit: 'text', align: "center"}
                            , {field: 'au_aoc', title: '累计浆量(L)', width: 90, edit: 'text', align: "center"}
                            , {field: 'cjsd', title: '初搅深度', width: 120, hide: true, edit: 'text', align: "center"}

                            , {field: 'fjsd', title: '复搅深度', width: 120, hide: true, edit: 'text', align: "center"}
                            , {
                                field: 'water_cement_ratio',
                                title: '水灰比',
                                hide: true,
                                width: 120,
                                edit: 'text',
                                align: "center"
                            }
                            , {field: 'rih_av', title: '平均下钻速度(cm/min)', width: 160, edit: 'text', align: "center"}
                            , {field: 'to_drill_av', title: '平均提钻速度(cm/min)', width: 160, edit: 'text', align: "center"}
                            , {
                                field: 'average_aoc',
                                title: '平均浆量',
                                hide: true,
                                width: 120,
                                hide: true,
                                edit: 'text',
                                align: "center"
                            }
                            , {field: 'average_aol', title: '平均灰量', width: 120, edit: 'text', align: "center"}
                            , {
                                field: 'average_current',
                                title: '平均电流',
                                hide: true,
                                width: 120,
                                edit: 'text',
                                align: "center"
                            }
                            , {field: 'zdzs', title: '最大钻速', width: 120, hide: true, edit: 'text', align: "center"}
                            , {field: 'zdts', title: '最大提速', width: 120, hide: true, edit: 'text', align: "center"}
                            , {field: 'zdxd', title: '最大斜度', width: 120, hide: true, edit: 'text', align: "center"}
                            , {field: 'pile_time', title: '成桩时间(s)', width: 100, edit: 'text', align: "center"}
                            , {field: 'kdtzc', title: '扩大头桩长', hide: true, width: 120, edit: 'text', align: "center"}
                            , {field: 'kdthl', title: '扩大头灰量', hide: true, width: 120, edit: 'text', align: "center"}
                            , {field: 'kdtjl', title: '扩大头浆量', hide: true, width: 120, edit: 'text', align: "center"}
                            , {field: 'xbzjl', title: '下部桩浆量', hide: true, width: 120, edit: 'text', align: "center"}
                            , {field: 'xbzhl', title: '下部桩灰量', hide: true, width: 120, edit: 'text', align: "center"}
                            , {field: 'yjjb', title: '预警级别', hide: true, width: 120, edit: 'text', align: "center"}
                            , {field: 'xxx', title: '评级', hide: true, width: 120, edit: 'text', align: "center"}
                            , {
                                field: 'empty_stir_depth',
                                title: '空搅深度',
                                hide: true,
                                width: 120,
                                edit: 'text',
                                align: "center"
                            }
                            , {fixed: 'right', title: '操作', toolbar: '#barDemo', width: 155}
                        ]],
                        done: function (res, curr, count) {
                            // console.log(res.totalPileLength)
                            //然后把值写上去td[data-field="itemNo" 定义在哪个列后显示checkbox
                            this.elem.next().find('.layui-table-total td[data-field="checkbox"] .layui-table-cell').text("合计");
                            this.elem.next().find('.layui-table-total td[data-field="stake_mark"] .layui-table-cell').text(res.totalPiles);
                            this.elem.next().find('.layui-table-total td[data-field="pile_length"] .layui-table-cell').text(res.totalPileLength);
                            this.elem.next().find('.layui-table-total td[data-field="au_aoc"] .layui-table-cell').text(res.sumAoc);
                            this.elem.next().find('.layui-table-total td[data-field="au_aol"] .layui-table-cell').text(res.sumAol);
                            // $('.layui-table-fixed-r').removeClass('layui-hide');
                            $(".layui-table-main tr").each(function (index, val) {
                                $($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
                                $($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
                            });
                        }
                        , page: true
                        , id: 'historicalReload'
                    });

                    table.on('tool(historicalTable)', function (obj) {
                        var data = obj.data;
                        if (obj.event === 'edit') {
                            /*  layer.open({
                                  type: 2,
                                  // title: '详细信息',
                                  maxmin: true,
                                  skin: 'layui-layer-lan',
                                  shadeClose: true, //点击遮罩关闭层
                                  area: ['1200px', '600px'],
                                  content: 'details.jsp', //弹框显示的url,对应的页面

                              })
                              console.log(data.stake_mark)*/
                            // element.tabChange('tab-all', 1);
                            // toChildValue(data);
                            details = data;//获取该行内容,赋值并传递至iframe子页面
                            var id = (new Date()).getTime();
                            addtab(id);//动态添加tab页
                            function addtab(id) {
                                element.tabAdd('tab-all', {
                                    title: data.stake_mark + '详情'
                                    ,
                                    content: '<iframe src="details.jsp" width="100%" height="100%" frameborder="0" scrolling="auto"id="detailsIframe"></iframe>' //支持传入html
                                    ,
                                    id: id
                                });
                                element.tabChange('tab-all', id);
                            }
                        } else if (obj.event === 'replay') {
                            playback = data;//获取该行内容,赋值并传递至iframe子页面
                            var id = (new Date()).getTime();
                            addtab(id);//动态添加tab页
                            function addtab(id) {
                                element.tabAdd('tab-all', {
                                    title: data.stake_mark + '回放'
                                    ,
                                    content: '<iframe src="playback.jsp" width="100%" height="100%" frameborder="0" scrolling="auto"id="detailsIframe"></iframe>' //支持传入html
                                    ,
                                    id: id
                                });
                                element.tabChange('tab-all', id);
                            }
                        }else if (obj.event === 'parameter'){
                            layer.tips(data.stake_mark, this);
                        }
                    })
                    //条件查询重载表格
                    active = {
                        reload: function () {
                            <%--var id = "${id}";--%>
                    /*        var projectId = $('#projectId');
                            var sectionId = $('#sectionId');*/
                            var stakeMark = $('#stakeMark');
                            var pileNum = $('#pileNum');
                            var state = $('#state');
                            var start = $('#start');
                            var end = $('#end');
                            var pileLength = $('#pileLength');
                            var pileLength2 = $('#pileLength2');
                            var aol = $('#aol');
                            var aol2 = $('#aol2');
                            var currentMax = $('#currentMax');
                            var currentMax2 = $('#currentMax2');
                            var pileTime = $('#pileTime');
                            var pileTime2 = $('#pileTime2');
                            //执行重载
                            table.reload('historicalReload', {
                                page: {
                                    curr: 1 //重新从第 1 页开始
                                }
                                , where: {
                                    // key: {
                                    stakeMark: stakeMark.val(),
                                    pileNum: pileNum.val(),
                                    state: state.val(),
                                    start: start.val(),
                                    end: end.val(),
                                    pileLength: pileLength.val(),
                                    pileLength2: pileLength2.val(),
                                    aol: aol.val(),
                                    aol2: aol2.val(),
                                    currentMax: currentMax.val(),
                                    currentMax2: currentMax2.val(),
                                    pileTime: pileTime.val(),
                                    pileTime2: pileTime2.val()
                                    // }
                                }
                            }, 'data');
                        }
                    };
                    //头工具栏事件
                    table.on('toolbar(historicalTable)', function (obj) {
                        var checkStatus = table.checkStatus(obj.config.id);
                        switch (obj.event) {
                            //自定义头工具栏右侧图标 - 提示
                            case 'LAYTABLE_TIPS':
                                //点击刷新
                                $(".layui-laypage-btn").click();
                                break;
                        }
                    });
                    $('.demoTable .layui-btn').on('click', function () {
                        var type = $(this).data('type');
                        active[type] ? active[type].call(this) : '';
                    });
                    //重置按钮
                    $('#reset').on('click', function () {
                        $(':input', '#resetForm')
                            .not(":button", ":reset", "hidden", "submit")
                            .val("")
                            .removeAttr("checked")
                            .removeAttr("selected");
                        // $("#book")[0].reset();
                        //执行重载
                        table.reload('historicalReload', {
                            page: {
                                curr: 1 //重新从第 1 页开始
                            }
                            , where: {
                                pileNum: "",
                                stakeMark: "",
                                start: "",
                                end: "",
                                pileLength: "",
                                pileLength2: "",
                                currentMax: "",
                                currentMax2: "",
                                aol: "",
                                aol2: "",
                                pileTime: "",
                                pileTime2: ""
                            }
                        }, 'data');
                    });
                    //筛选按钮
                    $("#filter").click(function () {
                        layer.open({
                            type: 1,
                            title: "多条件组合筛选",
                            area: ['32%', '66%'],//窗口大小
                            btn: ['确定', '取消'],//按钮
                            shadeClose: true, //点击遮罩关闭层
                            content: $("#filtrateWindow"),//对应表单
                            btn: ['确定', '清空']
                            , yes: function (index, layero) {
                                //按钮【按钮一】的回调
                                var stakeMark = $('#stakeMark');
                                var pileNum = $('#pileNum');
                                var state = $('#state');
                                var start = $('#start');
                                var end = $('#end');
                                var pileLength = $('#pileLength');
                                var pileLength2 = $('#pileLength2');
                                var aol = $('#aol');
                                var aol2 = $('#aol2');
                                var currentMax = $('#currentMax');
                                var currentMax2 = $('#currentMax2');
                                var pileTime = $('#pileTime');
                                var pileTime2 = $('#pileTime2');
                                table.reload('historicalReload', {
                                    page: {
                                        curr: 1 //重新从第 1 页开始
                                    }
                                    , where: {
                                        // key: {
                                        stakeMark: stakeMark.val(),
                                        pileNum: pileNum.val(),
                                        state: state.val(),
                                        start: start.val(),
                                        end: end.val(),
                                        pileLength: pileLength.val(),
                                        pileLength2: pileLength2.val(),
                                        aol: aol.val(),
                                        aol2: aol2.val(),
                                        currentMax: currentMax.val(),
                                        currentMax2: currentMax2.val(),
                                        pileTime: pileTime.val(),
                                        pileTime2: pileTime2.val()
                                        // }
                                    }
                                }, 'data');
                                layer.close(index);//关闭弹出层
                            }, btn2: function (index, layero) {
                                //按钮【按钮二】的回调
                                /*    layer.msg('hello');
                                    return false;*/
                                //开启该代码可禁止点击该按钮关闭
                                $(':input', '#filtrateWindow')
                                    .not(":button", ":reset", "hidden", "submit")
                                    .val("")
                                    .removeAttr("checked")
                                    .removeAttr("selected");
                                $(':input', '#resetForm')
                                    .not(":button", ":reset", "hidden", "submit")
                                    .val("")
                                    .removeAttr("checked")
                                    .removeAttr("selected");

                                table.reload('historicalReload', {
                                    page: {
                                        curr: 1 //重新从第 1 页开始
                                    }
                                    , where: {
                                        // key: {
                                        stakeMark: "",
                                        pileNum: "",
                                        state: "",
                                        start: "",
                                        end: "",
                                        pileLength: "",
                                        pileLength2: "",
                                        aol: "",
                                        aol2: "",
                                        currentMax: "",
                                        currentMax2: "",
                                        pileTime: "",
                                        pileTime2: ""
                                        // }
                                    }
                                }, 'data');
                                layer.close(index);//关闭弹出层
                            }
                        })
                    })


                }
                else if (layid == 3) {
                    //历史报警图表
                    table.render({
                        elem: '#warningTable'
                        , url: '/cement/findAll2.do'
                        , skin: 'nob'//样式格式
                        , size: 'sm'//小型表格
                        // , toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板
                        // , totalRow: true
                        , title: '历史报警'
                        , cols: [[
                            {title: '序号', align: 'center', type: 'numbers'}

                            // , {field: 'id', title: 'ID', width: 80, fixed: 'left', unresize: true, sort: true}
                            , {
                                field: 'device_code',
                                title: '设备编号',
                                hide: true,
                                width: 120,
                                edit: 'text',
                                align: "center"
                            }
                            , {
                                field: 'pile_driver_num',
                                title: '桩机号',
                                hide: true,
                                width: 120,
                                edit: 'text',
                                align: "center"
                            }
                            , {field: 'stake_mark', title: '桩号', width: 100, edit: 'text', align: "center"}
                            , {
                                field: 'start_date',
                                align: "center",
                                title: '开始时间',
                                width: 180,
                                edit: 'text',
                                templet: "<div>{{layui.util.toDateString(d.start_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                            }
                            , {
                                field: 'end_date',
                                align: "center",
                                title: '结束时间',
                                width: 180,
                                edit: 'text',
                                templet: "<div>{{layui.util.toDateString(d.end_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                            }

                            , {field: 'pile_length', title: '施工桩长(m)', width: 100, edit: 'text', align: "center"}
                            , {field: 'au_aol', title: '累计灰量', width: 120, edit: 'text', align: "center"}
                            , {field: 'au_aoc', title: '累计浆量', width: 120, edit: 'text', align: "center"}
                            , {field: 'cjsd', title: '初搅深度', width: 120, hide: true, edit: 'text', align: "center"}

                            , {field: 'fjsd', title: '复搅深度', width: 120, hide: true, edit: 'text', align: "center"}
                            , {
                                field: 'water_cement_ratio',
                                title: '水灰比',
                                hide: true,
                                width: 120,
                                edit: 'text',
                                align: "center"
                            }
                            , {field: 'rih_av', title: '平均下钻速度', width: 120, edit: 'text', align: "center"}
                            , {field: 'to_drill_av', title: '平均提钻速度', width: 120, edit: 'text', align: "center"}
                            , {
                                field: 'average_aoc',
                                title: '平均浆量',
                                hide: true,
                                width: 120,
                                hide: true,
                                edit: 'text',
                                align: "center"
                            }
                            , {field: 'average_aol', title: '平均灰量', width: 100, edit: 'text', align: "center"}
                            , {
                                field: 'average_current',
                                title: '平均电流',
                                hide: true,
                                width: 120,
                                edit: 'text',
                                align: "center"
                            }
                            , {field: 'zdzs', title: '最大钻速', width: 120, hide: true, edit: 'text', align: "center"}

                        ]],
                        done: function (res, curr, count) {
                            // console.log(res.totalPileLength)
                            //然后把值写上去td[data-field="itemNo" 定义在哪个列后显示checkbox
                            this.elem.next().find('.layui-table-total td[data-field="checkbox"] .layui-table-cell').text("合计");
                            this.elem.next().find('.layui-table-total td[data-field="stake_mark"] .layui-table-cell').text(res.totalPiles);
                            this.elem.next().find('.layui-table-total td[data-field="pile_length"] .layui-table-cell').text(res.totalPileLength);
                            this.elem.next().find('.layui-table-total td[data-field="au_aoc"] .layui-table-cell').text(res.sumAoc);
                            this.elem.next().find('.layui-table-total td[data-field="au_aol"] .layui-table-cell').text(res.sumAol);
                            // $('.layui-table-fixed-r').removeClass('layui-hide');
                        }
                        , page: true
                        , id: 'warningReload'
                    });
                    element.on('tab(docDemoTabBrief1)', function (data) {

                        var laycid = $(this).attr('lay-id');

                        console.log(laycid);
                        if(laycid==6){
                            table.render({
                                elem: '#warningTable'
                                , url: '/cement/findAll2.do'
                                , skin: 'nob'//样式格式
                                , size: 'sm'//小型表格
                                // , toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板
                                // , totalRow: true
                                , title: '历史报警'
                                , cols: [[
                                    {title: '序号', align: 'center', type: 'numbers'}

                                    // , {field: 'id', title: 'ID', width: 80, fixed: 'left', unresize: true, sort: true}
                                    , {
                                        field: 'device_code',
                                        title: '设备编号',
                                        hide: true,
                                        width: 120,
                                        edit: 'text',
                                        align: "center"
                                    }
                                    , {
                                        field: 'pile_driver_num',
                                        title: '桩机号',
                                        hide: true,
                                        width: 120,
                                        edit: 'text',
                                        align: "center"
                                    }
                                    , {field: 'stake_mark', title: '桩号', width: 100, edit: 'text', align: "center"}
                                    , {
                                        field: 'start_date',
                                        align: "center",
                                        title: '开始时间',
                                        width: 180,
                                        edit: 'text',
                                        templet: "<div>{{layui.util.toDateString(d.start_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                                    }
                                    , {
                                        field: 'end_date',
                                        align: "center",
                                        title: '结束时间',
                                        width: 180,
                                        edit: 'text',
                                        templet: "<div>{{layui.util.toDateString(d.end_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                                    }

                                    , {field: 'pile_length', title: '施工桩长(m)', width: 100, edit: 'text', align: "center"}
                                    , {field: 'au_aol', title: '累计灰量', width: 120, edit: 'text', align: "center"}
                                    , {field: 'au_aoc', title: '累计浆量', width: 120, edit: 'text', align: "center"}
                                    , {field: 'cjsd', title: '初搅深度', width: 120, hide: true, edit: 'text', align: "center"}

                                    , {field: 'fjsd', title: '复搅深度', width: 120, hide: true, edit: 'text', align: "center"}
                                    , {
                                        field: 'water_cement_ratio',
                                        title: '水灰比',
                                        hide: true,
                                        width: 120,
                                        edit: 'text',
                                        align: "center"
                                    }
                                    , {field: 'rih_av', title: '平均下钻速度', width: 120, edit: 'text', align: "center"}
                                    , {field: 'to_drill_av', title: '平均提钻速度', width: 120, edit: 'text', align: "center"}
                                    , {
                                        field: 'average_aoc',
                                        title: '平均浆量',
                                        hide: true,
                                        width: 120,
                                        hide: true,
                                        edit: 'text',
                                        align: "center"
                                    }
                                    , {field: 'average_aol', title: '平均灰量', width: 100, edit: 'text', align: "center"}
                                    , {
                                        field: 'average_current',
                                        title: '平均电流',
                                        hide: true,
                                        width: 120,
                                        edit: 'text',
                                        align: "center"
                                    }
                                    , {field: 'zdzs', title: '最大钻速', width: 120, hide: true, edit: 'text', align: "center"}

                                ]],
                                done: function (res, curr, count) {
                                    // console.log(res.totalPileLength)
                                    //然后把值写上去td[data-field="itemNo" 定义在哪个列后显示checkbox
                                    this.elem.next().find('.layui-table-total td[data-field="checkbox"] .layui-table-cell').text("合计");
                                    this.elem.next().find('.layui-table-total td[data-field="stake_mark"] .layui-table-cell').text(res.totalPiles);
                                    this.elem.next().find('.layui-table-total td[data-field="pile_length"] .layui-table-cell').text(res.totalPileLength);
                                    this.elem.next().find('.layui-table-total td[data-field="au_aoc"] .layui-table-cell').text(res.sumAoc);
                                    this.elem.next().find('.layui-table-total td[data-field="au_aol"] .layui-table-cell').text(res.sumAol);
                                    // $('.layui-table-fixed-r').removeClass('layui-hide');
                                }
                                , page: true
                                , id: 'warningReload'
                            });
                        }
                      else  if (laycid == 7) {
                            //报警分析
                            table.render({
                                elem: '#warningTable'
                                , url: '/cement/findAll3.do'
                                , skin: 'nob'//样式格式
                                , size: 'sm'//小型表格
                                // , toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板
                                // , totalRow: true
                                , title: '报警分析'
                                , cols: [[
                                    {title: '序号', align: 'center', type: 'numbers'}

                                    // , {field: 'id', title: 'ID', width: 80, fixed: 'left', unresize: true, sort: true}
                                    , {
                                        field: 'device_code',
                                        title: '设备编号',
                                        hide: true,
                                        width: 120,
                                        edit: 'text',
                                        align: "center"
                                    }
                                    , {
                                        field: 'pile_driver_num',
                                        title: '桩机号',
                                        hide: true,
                                        width: 120,
                                        edit: 'text',
                                        align: "center"
                                    }
                                    , {field: 'stake_mark', title: '桩号', width: 100, edit: 'text', align: "center"}
                                    , {
                                        field: 'start_date',
                                        align: "center",
                                        title: '开始时间',
                                        width: 180,
                                        edit: 'text',
                                        templet: "<div>{{layui.util.toDateString(d.start_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                                    }
                                    , {
                                        field: 'end_date',
                                        align: "center",
                                        title: '结束时间',
                                        width: 180,
                                        edit: 'text',
                                        templet: "<div>{{layui.util.toDateString(d.end_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                                    }

                                    , {
                                        field: 'pile_length',
                                        title: '施工桩长(m)',
                                        width: 100,
                                        edit: 'text',
                                        align: "center"
                                    }
                                    , {field: 'au_aol', title: '累计灰量', width: 120, edit: 'text', align: "center"}
                                    , {field: 'au_aoc', title: '累计浆量', width: 120, edit: 'text', align: "center"}
                                    , {
                                        field: 'cjsd',
                                        title: '初搅深度',
                                        width: 120,
                                        hide: true,
                                        edit: 'text',
                                        align: "center"
                                    }

                                    , {
                                        field: 'fjsd',
                                        title: '复搅深度',
                                        width: 120,
                                        hide: true,
                                        edit: 'text',
                                        align: "center"
                                    }
                                    , {
                                        field: 'water_cement_ratio',
                                        title: '水灰比',
                                        hide: true,
                                        width: 120,
                                        edit: 'text',
                                        align: "center"
                                    }
                                    , {field: 'rih_av', title: '平均下钻速度', width: 120, edit: 'text', align: "center"}
                                    , {field: 'to_drill_av', title: '平均提钻速度', width: 120, edit: 'text', align: "center"}
                                    , {
                                        field: 'average_aoc',
                                        title: '平均浆量',
                                        hide: true,
                                        width: 120,
                                        hide: true,
                                        edit: 'text',
                                        align: "center"
                                    }
                                    , {field: 'average_aol', title: '平均灰量', width: 100, edit: 'text', align: "center"}
                                    , {
                                        field: 'average_current',
                                        title: '平均电流',
                                        hide: true,
                                        width: 120,
                                        edit: 'text',
                                        align: "center"
                                    }
                                    , {
                                        field: 'zdzs',
                                        title: '最大钻速',
                                        width: 120,
                                        hide: true,
                                        edit: 'text',
                                        align: "center"
                                    }

                                ]],
                                done: function (res, curr, count) {
                                    // console.log(res.totalPileLength)
                                    //然后把值写上去td[data-field="itemNo" 定义在哪个列后显示checkbox
                                    this.elem.next().find('.layui-table-total td[data-field="checkbox"] .layui-table-cell').text("合计");
                                    this.elem.next().find('.layui-table-total td[data-field="stake_mark"] .layui-table-cell').text(res.totalPiles);
                                    this.elem.next().find('.layui-table-total td[data-field="pile_length"] .layui-table-cell').text(res.totalPileLength);
                                    this.elem.next().find('.layui-table-total td[data-field="au_aoc"] .layui-table-cell').text(res.sumAoc);
                                    this.elem.next().find('.layui-table-total td[data-field="au_aol"] .layui-table-cell').text(res.sumAol);
                                    // $('.layui-table-fixed-r').removeClass('layui-hide');
                                }
                                , page: true
                                , id: 'warningReload'
                            });
                        }
                    })

                }
                else if (layid == 4) {

                    table.render({
                        elem: '#timeStateTable'
                        , url: '/cement/findAll4.do'
                        , skin: 'nob'//样式格式
                        , size: 'sm'//小型表格
                        // , toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板

                        // , totalRow: true
                        , title: '历史状态'
                        , cols: [[
                            {title: '序号', align: 'center', type: 'numbers'}

                            // , {field: 'id', title: 'ID', width: 80, fixed: 'left', unresize: true, sort: true}
                            , {field: 'device_code', title: '设备编号', hide: true, width: 120, edit: 'text', align: "center"}
                            , {field: 'pile_driver_num', title: '桩机号', hide: true, width: 120, edit: 'text', align: "center"}
                            , {field: 'stake_mark', title: '桩号', width: 100, edit: 'text', align: "center"}
                            , {
                                field: 'start_date',
                                align: "center",
                                title: '开始时间',
                                width: 180,
                                edit: 'text',
                                templet: "<div>{{layui.util.toDateString(d.start_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                            }
                            , {
                                field: 'end_date',
                                align: "center",
                                title: '结束时间',
                                width: 180,
                                edit: 'text',
                                templet: "<div>{{layui.util.toDateString(d.end_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                            }

                            , {field: 'pile_length', title: '施工桩长(m)', width: 100, edit: 'text', align: "center"}
                            , {field: 'au_aol', title: '累计灰量', width: 120, edit: 'text', align: "center"}
                            , {field: 'au_aoc', title: '累计浆量', width: 120, edit: 'text', align: "center"}
                            , {field: 'cjsd', title: '初搅深度', width: 120, hide: true, edit: 'text', align: "center"}

                            , {field: 'fjsd', title: '复搅深度', width: 120, hide: true, edit: 'text', align: "center"}
                            , {field: 'water_cement_ratio', title: '水灰比', hide: true, width: 120, edit: 'text', align: "center"}
                            , {field: 'rih_av', title: '平均下钻速度', width: 120, edit: 'text', align: "center"}
                            , {field: 'to_drill_av', title: '平均提钻速度', width: 120, edit: 'text', align: "center"}
                            , {
                                field: 'average_aoc',
                                title: '平均浆量',
                                hide: true,
                                width: 120,
                                hide: true,
                                edit: 'text',
                                align: "center"
                            }
                            , {field: 'average_aol', title: '平均灰量', width: 100, edit: 'text', align: "center"}
                            , {field: 'average_current', title: '平均电流', hide: true, width: 120, edit: 'text', align: "center"}
                            , {field: 'zdzs', title: '最大钻速', width: 120, hide: true, edit: 'text', align: "center"}

                        ]],
                        done: function (res, curr, count) {
                            // console.log(res.totalPileLength)
                            //然后把值写上去td[data-field="itemNo" 定义在哪个列后显示checkbox
                            this.elem.next().find('.layui-table-total td[data-field="checkbox"] .layui-table-cell').text("合计");
                            this.elem.next().find('.layui-table-total td[data-field="stake_mark"] .layui-table-cell').text(res.totalPiles);
                            this.elem.next().find('.layui-table-total td[data-field="pile_length"] .layui-table-cell').text(res.totalPileLength);
                            this.elem.next().find('.layui-table-total td[data-field="au_aoc"] .layui-table-cell').text(res.sumAoc);
                            this.elem.next().find('.layui-table-total td[data-field="au_aol"] .layui-table-cell').text(res.sumAol);
                            // $('.layui-table-fixed-r').removeClass('layui-hide');
                        }
                        , page: true
                        , id: 'timeStateTableReload'
                    });
                    element.on('tab(docDemoTabBrief2)', function (data) {

                        var laycid = $(this).attr('lay-id');

                        console.log(laycid);
                        if(laycid==8){
                            table.render({
                                elem: '#timeStateTable'
                                , url: '/cement/findAll4.do'
                                , skin: 'nob'//样式格式
                                , size: 'sm'//小型表格
                                // , toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板

                                // , totalRow: true
                                , title: '历史状态'
                                , cols: [[
                                    {title: '序号', align: 'center', type: 'numbers'}

                                    // , {field: 'id', title: 'ID', width: 80, fixed: 'left', unresize: true, sort: true}
                                    , {field: 'device_code', title: '设备编号', hide: true, width: 120, edit: 'text', align: "center"}
                                    , {field: 'pile_driver_num', title: '桩机号', hide: true, width: 120, edit: 'text', align: "center"}
                                    , {field: 'stake_mark', title: '桩号', width: 100, edit: 'text', align: "center"}
                                    , {
                                        field: 'start_date',
                                        align: "center",
                                        title: '开始时间',
                                        width: 180,
                                        edit: 'text',
                                        templet: "<div>{{layui.util.toDateString(d.start_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                                    }
                                    , {
                                        field: 'end_date',
                                        align: "center",
                                        title: '结束时间',
                                        width: 180,
                                        edit: 'text',
                                        templet: "<div>{{layui.util.toDateString(d.end_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                                    }

                                    , {field: 'pile_length', title: '施工桩长(m)', width: 100, edit: 'text', align: "center"}
                                    , {field: 'au_aol', title: '累计灰量', width: 120, edit: 'text', align: "center"}
                                    , {field: 'au_aoc', title: '累计浆量', width: 120, edit: 'text', align: "center"}
                                    , {field: 'cjsd', title: '初搅深度', width: 120, hide: true, edit: 'text', align: "center"}

                                    , {field: 'fjsd', title: '复搅深度', width: 120, hide: true, edit: 'text', align: "center"}
                                    , {field: 'water_cement_ratio', title: '水灰比', hide: true, width: 120, edit: 'text', align: "center"}
                                    , {field: 'rih_av', title: '平均下钻速度', width: 120, edit: 'text', align: "center"}
                                    , {field: 'to_drill_av', title: '平均提钻速度', width: 120, edit: 'text', align: "center"}
                                    , {
                                        field: 'average_aoc',
                                        title: '平均浆量',
                                        hide: true,
                                        width: 120,
                                        hide: true,
                                        edit: 'text',
                                        align: "center"
                                    }
                                    , {field: 'average_aol', title: '平均灰量', width: 100, edit: 'text', align: "center"}
                                    , {field: 'average_current', title: '平均电流', hide: true, width: 120, edit: 'text', align: "center"}
                                    , {field: 'zdzs', title: '最大钻速', width: 120, hide: true, edit: 'text', align: "center"}

                                ]],
                                done: function (res, curr, count) {
                                    // console.log(res.totalPileLength)
                                    //然后把值写上去td[data-field="itemNo" 定义在哪个列后显示checkbox
                                    this.elem.next().find('.layui-table-total td[data-field="checkbox"] .layui-table-cell').text("合计");
                                    this.elem.next().find('.layui-table-total td[data-field="stake_mark"] .layui-table-cell').text(res.totalPiles);
                                    this.elem.next().find('.layui-table-total td[data-field="pile_length"] .layui-table-cell').text(res.totalPileLength);
                                    this.elem.next().find('.layui-table-total td[data-field="au_aoc"] .layui-table-cell').text(res.sumAoc);
                                    this.elem.next().find('.layui-table-total td[data-field="au_aol"] .layui-table-cell').text(res.sumAol);
                                    // $('.layui-table-fixed-r').removeClass('layui-hide');
                                }
                                , page: true
                                , id: 'timeStateTableReload'
                            });
                        }
                        else  if (laycid == 9) {
                            //报警分析
                            table.render({
                                elem: '#historyStateTable'
                                , url: '/cement/findAll3.do'
                                , skin: 'nob'//样式格式
                                , size: 'sm'//小型表格
                                // , toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板

                                // , totalRow: true
                                , title: '历史状态'
                                , cols: [[
                                    {title: '序号', align: 'center', type: 'numbers'}

                                    // , {field: 'id', title: 'ID', width: 80, fixed: 'left', unresize: true, sort: true}
                                    , {field: 'device_code', title: '设备编号', hide: true, width: 120, edit: 'text', align: "center"}
                                    , {field: 'pile_driver_num', title: '桩机号', hide: true, width: 120, edit: 'text', align: "center"}
                                    , {field: 'stake_mark', title: '桩号', width: 100, edit: 'text', align: "center"}
                                    , {
                                        field: 'start_date',
                                        align: "center",
                                        title: '开始时间',
                                        width: 180,
                                        edit: 'text',
                                        templet: "<div>{{layui.util.toDateString(d.start_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                                    }
                                    , {
                                        field: 'end_date',
                                        align: "center",
                                        title: '结束时间',
                                        width: 180,
                                        edit: 'text',
                                        templet: "<div>{{layui.util.toDateString(d.end_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                                    }

                                    , {field: 'pile_length', title: '施工桩长(m)', width: 100, edit: 'text', align: "center"}
                                    , {field: 'au_aol', title: '累计灰量', width: 120, edit: 'text', align: "center"}
                                    , {field: 'au_aoc', title: '累计浆量', width: 120, edit: 'text', align: "center"}
                                    , {field: 'cjsd', title: '初搅深度', width: 120, hide: true, edit: 'text', align: "center"}

                                    , {field: 'fjsd', title: '复搅深度', width: 120, hide: true, edit: 'text', align: "center"}
                                    , {field: 'water_cement_ratio', title: '水灰比', hide: true, width: 120, edit: 'text', align: "center"}
                                    , {field: 'rih_av', title: '平均下钻速度', width: 120, edit: 'text', align: "center"}
                                    , {field: 'to_drill_av', title: '平均提钻速度', width: 120, edit: 'text', align: "center"}
                                    , {
                                        field: 'average_aoc',
                                        title: '平均浆量',
                                        hide: true,
                                        width: 120,
                                        hide: true,
                                        edit: 'text',
                                        align: "center"
                                    }
                                    , {field: 'average_aol', title: '平均灰量', width: 100, edit: 'text', align: "center"}
                                    , {field: 'average_current', title: '平均电流', hide: true, width: 120, edit: 'text', align: "center"}
                                    , {field: 'zdzs', title: '最大钻速', width: 120, hide: true, edit: 'text', align: "center"}

                                ]],
                                done: function (res, curr, count) {
                                    // console.log(res.totalPileLength)
                                    //然后把值写上去td[data-field="itemNo" 定义在哪个列后显示checkbox
                                    this.elem.next().find('.layui-table-total td[data-field="checkbox"] .layui-table-cell').text("合计");
                                    this.elem.next().find('.layui-table-total td[data-field="stake_mark"] .layui-table-cell').text(res.totalPiles);
                                    this.elem.next().find('.layui-table-total td[data-field="pile_length"] .layui-table-cell').text(res.totalPileLength);
                                    this.elem.next().find('.layui-table-total td[data-field="au_aoc"] .layui-table-cell').text(res.sumAoc);
                                    this.elem.next().find('.layui-table-total td[data-field="au_aol"] .layui-table-cell').text(res.sumAol);
                                    // $('.layui-table-fixed-r').removeClass('layui-hide');
                                }
                                , page: true
                                , id: 'historyStateTableReload'
                            });
                        }
                    })
                } else if (layid == 5) {
                    layer.msg(123)
                }
            });

            element.on('nav(tab-all)', function (elem) {
                console.log(elem); //得到当前点击的DOM对象
            });

            function initplayback(device_code) {
                // console.log(device_code)
                $.post("/data/getData.do", {}, function (obj) {
                    //设置地图参数
                    var marker = new AMap.Marker({
                        position: new AMap.LngLat(114.384129, 30.508543),
                        offset: new AMap.Pixel(-10, -10),
                        icon: '/img/dd.png', // 添加 Icon 图标 URL
                        title: '测试'

                    });
                    marker.setLabel({
                        offset: new AMap.Pixel(20, 20),  //设置文本标注偏移量
                        content: "<div class='info'>我是 marker 的 label 标签</div>", //设置文本标注内容
                        offset: new AMap.Pixel(-60, -30)//设置lable偏移量
                        // direction: 'top' //设置文本标注方位
                    });
                    map.add(marker);
                    map.setCenter([114.384129, 30.508543]);//设置地图初始中心位置
                    map.setZoom(10);//设置地图缩放级别
                    var aolarr = [];
                    var aolDownArr = [];
                    var elearr = [];
                    var eleDownArr = [];
                    var up = obj.up;
                    var down = obj.down;
                    var i = 0;
                    var j = 0;
                    var r1;//下钻时期setimeout返回公共变量
                    var r2;//提钻时期setimeout返回公共变量


                    function startCount() {
                        if (i < up.length) {
                            // console.log(tab);
                            if (!tab) {
                                return;
                            }
                            // console.log(123)
                            var arr = [];
                            var arr2 = [];
                            var deptharr = [];
                            var speedarr = [];
                            var fluxarr = [];
                            var currentarr = [];
                            arr.push(up[i].au_aol);
                            arr2.push(up[i].electricity);
                            arr.push(up[i].drilling_depth);
                            arr2.push(up[i].drilling_depth);
                            deptharr.push(up[i].drilling_depth);
                            speedarr.push(up[i].drilling_speed);
                            fluxarr.push(up[i].cement_flux);
                            currentarr.push(up[i].electricity);
                            aolarr.push(arr);
                            elearr.push(arr2);
                            runInHoleOption.series[0].data = aolarr;
                            runInHoleOption.series[1].data = elearr;
                            depthOption.series[0].data = deptharr;
                            speedOption.series[0].data = speedarr;
                            flowOption.series[0].data = fluxarr;
                            electricityOption.series[0].data = currentarr;
                            runInHole.setOption(runInHoleOption);
                            depth.setOption(depthOption);
                            speed.setOption(speedOption);
                            flow.setOption(flowOption);
                            electricity.setOption(electricityOption);
                            i++;
                            var ff = f1();
                            r1 = setTimeout(startCount, f1());

                        } else {
                            if (j < down.length) {
                                // console.log(tab)
                                if (!tab) {
                                    return;
                                }
                                var arr = [];
                                var arr2 = [];
                                var deptharr = [];
                                var speedarr = [];
                                var fluxarr = [];
                                var currentarr = [];
                                arr.push(down[j].au_aol);
                                arr2.push(down[j].electricity);
                                arr.push(down[j].drilling_depth);
                                arr2.push(down[j].drilling_depth);
                                deptharr.push(down[j].drilling_depth);
                                speedarr.push(down[j].drilling_speed);
                                fluxarr.push(down[j].cement_flux);
                                currentarr.push(down[j].electricity);
                                aolDownArr.push(arr);
                                eleDownArr.push(arr2);
                                console.log(aolDownArr);
                                console.log(eleDownArr);
                                runOnHoleOption.series[0].data = aolDownArr;
                                runOnHoleOption.series[1].data = eleDownArr;
                                depthOption.series[0].data = deptharr;
                                speedOption.series[0].data = speedarr;
                                flowOption.series[0].data = fluxarr;
                                electricityOption.series[0].data = currentarr;
                                runOnHole.setOption(runOnHoleOption);
                                depth.setOption(depthOption);
                                speed.setOption(speedOption);
                                flow.setOption(flowOption);
                                electricity.setOption(electricityOption);
                                j++;
                                r2 = setTimeout(startCount, f1());
                            } else {
                                if (!tab) {
                                    return;
                                }
                            /*    endmsg = layer.msg('<span style="font-size:24px">播放结束</span>', {
                                    time: '-1',
                                    area: '300px'
                                });*/
                                $("#kaishi").find("span").text("播放结束")
                                $("#kaishi").css({"display":"block"});
                            }
                        }
                        //setTimeout是超时调用，使用递归模拟间歇调用
                    }

                    setTimeout(startCount, 1000);//启动定时器

                    var interval = null;//计时器
                    var tag = true;//判断播放暂停
                    $("#bofang").click(function () {
                            if (tag) {
                                $(this).removeClass("layui-icon layui-icon-pause").addClass("layui-icon layui-icon-play");
                                clearTimeout(interval);
                                clearTimeout(r1);
                                clearTimeout(r2);
                                interval = null;
                               /* pause = layer.msg('<span style="font-size:24px">暂停</span>', {
                                    time: '-1',
                                    area: '200px'
                                });*/
                               $("#kaishi").find("span").text("暂停")
                               $("#kaishi").css({"display":"block"});

                                console.log("暂停");
                                tag = false;
                            } else {
                                $(this).removeClass("layui-icon layui-icon-play").addClass("layui-icon layui-icon-pause");
                                if (interval != null) {//判断计时器是否为空
                                    clearTimeout(interval);
                                    interval = null;
                                }
                                console.log("播放")
                                $("#kaishi").css({"display":"none"})

                                interval = setTimeout(startCount, 10);//启动计时器，调用overs函数，
                                tag = true;
                            }
                        }
                    )
                    //绑定重播单击事件
                    $("#chongbo").click(function () {
                        runInHoleOption.series[0].data = [];
                        runInHoleOption.series[1].data = [];
                        runOnHoleOption.series[0].data = [];
                        runOnHoleOption.series[1].data = [];
                        depthOption.series[0].data = [];
                        speedOption.series[0].data = [];
                        flowOption.series[0].data = [];
                        electricityOption.series[0].data = [];
                        runInHole.setOption(runInHoleOption);
                        runOnHole.setOption(runOnHoleOption);
                        depth.setOption(depthOption);
                        speed.setOption(speedOption);
                        flow.setOption(flowOption);
                        electricity.setOption(electricityOption);
                        aolarr = [];
                        aolDownArr = [];
                        elearr = [];
                        eleDownArr = [];
                        i = 0;
                        j = 0;
                        clearTimeout(interval);
                        clearTimeout(r1);
                        clearTimeout(r2);
                        setTimeout(startCount, f1());
                        // layer.close(endmsg);
                        $("#bofang").removeClass("layui-icon layui-icon-play").addClass("layui-icon layui-icon-pause");
                        tag = true;
                        $("#kaishi").css({"display":"none"});

                        // layer.close(pause);
                    });

                    //setimeout计时
                    function f1() {
                        var s = $("#h1").val();
                        return s;
                    }
                });
                //关闭窗口
                $("#tingzhi").click(function () {
                    var wname = window.name;
                    var index = parent.layer.getFrameIndex(wname);
                    parent.layer.close(index);
                })
            }

            /*  function tabplayback(device_code) {
                  if (tab) {
                      tab = false;
                  } else {
                      tab = true;
                  }
                  console.log(tab+"123")
                  $.post("/data/getData.do", {}, function (obj) {
                      //设置地图参数
                      var marker = new AMap.Marker({
                          position: new AMap.LngLat(114.384129, 30.508543),
                          offset: new AMap.Pixel(-10, -10),
                          icon: '/img/dd.png', // 添加 Icon 图标 URL
                          title: '测试'

                      });
                      marker.setLabel({
                          offset: new AMap.Pixel(20, 20),  //设置文本标注偏移量
                          content: "<div class='info'>我是 marker 的 label 标签</div>", //设置文本标注内容
                          offset: new AMap.Pixel(-60, -30)//设置lable偏移量
                          // direction: 'top' //设置文本标注方位
                      });
                      map.add(marker);
                      map.setCenter([114.384129, 30.508543]);//设置地图初始中心位置
                      map.setZoom(10);//设置地图缩放级别
                      var aolarr = [];
                      var aolDownArr = [];
                      var elearr = [];
                      var eleDownArr = [];
                      var up = obj.up;
                      var down = obj.down;
                      var i = 0;
                      var j = 0;
                      var r1;//下钻时期setimeout返回公共变量
                      var r2;//提钻时期setimeout返回公共变量
                      var endmsg;

                      function startCount() {
                          // console.log(layid);
                          if (i < up.length) {
                              console.log(456)
                              var arr = [];
                              var arr2 = [];
                              var deptharr = [];
                              var speedarr = [];
                              var fluxarr = [];
                              var currentarr = [];
                              arr.push(up[i].au_aol);
                              arr2.push(up[i].electricity);
                              arr.push(up[i].drilling_depth);
                              arr2.push(up[i].drilling_depth);
                              deptharr.push(up[i].drilling_depth);
                              speedarr.push(up[i].drilling_speed);
                              fluxarr.push(up[i].cement_flux);
                              currentarr.push(up[i].electricity);
                              aolarr.push(arr);
                              elearr.push(arr2);
                              runInHoleOption.series[0].data = aolarr;
                              runInHoleOption.series[1].data = elearr;
                              depthOption.series[0].data = deptharr;
                              speedOption.series[0].data = speedarr;
                              flowOption.series[0].data = fluxarr;
                              electricityOption.series[0].data = currentarr;
                              runInHole.setOption(runInHoleOption);
                              depth.setOption(depthOption);
                              speed.setOption(speedOption);
                              flow.setOption(flowOption);
                              electricity.setOption(electricityOption);
                              i++;
                              var ff = f1();
                              r1 = setTimeout(startCount, f1());
                          } else {
                              if (j < down.length) {
                                  var arr = [];
                                  var arr2 = [];
                                  var deptharr = [];
                                  var speedarr = [];
                                  var fluxarr = [];
                                  var currentarr = [];
                                  arr.push(down[j].au_aol);
                                  arr2.push(down[j].electricity);
                                  arr.push(down[j].drilling_depth);
                                  arr2.push(down[j].drilling_depth);
                                  deptharr.push(down[j].drilling_depth);
                                  speedarr.push(down[j].drilling_speed);
                                  fluxarr.push(down[j].cement_flux);
                                  currentarr.push(down[j].electricity);
                                  aolDownArr.push(arr);
                                  eleDownArr.push(arr2);
                                  console.log(aolDownArr);
                                  console.log(eleDownArr);
                                  runOnHoleOption.series[0].data = aolDownArr;
                                  runOnHoleOption.series[1].data = eleDownArr;
                                  depthOption.series[0].data = deptharr;
                                  speedOption.series[0].data = speedarr;
                                  flowOption.series[0].data = fluxarr;
                                  electricityOption.series[0].data = currentarr;
                                  runOnHole.setOption(runOnHoleOption);
                                  depth.setOption(depthOption);
                                  speed.setOption(speedOption);
                                  flow.setOption(flowOption);
                                  electricity.setOption(electricityOption);
                                  j++;
                                  r2 = setTimeout(startCount, f1());
                              } else {
                                  endmsg = layer.msg('<span style="font-size:24px">播放结束</span>', {
                                      time: '-1',
                                      area: '300px'
                                  });
                              }
                          }
                          //setTimeout是超时调用，使用递归模拟间歇调用
                      }

                      setTimeout(startCount, 1000);//启动定时器

                      var interval = null;//计时器
                      var pause;//layui消息框
                      var tag = true;//判断播放暂停
                      $("#bofang").click(function () {
                              if (tag) {
                                  $(this).removeClass("layui-icon layui-icon-pause").addClass("layui-icon layui-icon-play");
                                  clearTimeout(interval);
                                  clearTimeout(r1);
                                  clearTimeout(r2);
                                  interval = null;
                                  pause = layer.msg('<span style="font-size:24px">暂停</span>', {
                                      time: '-1',
                                      area: '200px'
                                  });
                                  tag = false;
                              } else {
                                  $(this).removeClass("layui-icon layui-icon-play").addClass("layui-icon layui-icon-pause");
                                  if (interval != null) {//判断计时器是否为空
                                      clearTimeout(interval);
                                      interval = null;
                                  }
                                  layer.close(pause);
                                  interval = setTimeout(startCount, 10);//启动计时器，调用overs函数，
                                  tag = true;
                              }
                          }
                      )
                      //绑定重播单击事件
                      $("#chongbo").click(function () {
                          runInHoleOption.series[0].data = [];
                          runInHoleOption.series[1].data = [];
                          runOnHoleOption.series[0].data = [];
                          runOnHoleOption.series[1].data = [];
                          depthOption.series[0].data = [];
                          speedOption.series[0].data = [];
                          flowOption.series[0].data = [];
                          electricityOption.series[0].data = [];
                          runInHole.setOption(runInHoleOption);
                          runOnHole.setOption(runOnHoleOption);
                          depth.setOption(depthOption);
                          speed.setOption(speedOption);
                          flow.setOption(flowOption);
                          electricity.setOption(electricityOption);
                          aolarr = [];
                          aolDownArr = [];
                          elearr = [];
                          eleDownArr = [];
                          i = 0;
                          j = 0;
                          clearTimeout(interval);
                          clearTimeout(r1);
                          clearTimeout(r2);
                          setTimeout(startCount, f1());
                          layer.close(endmsg);
                          $("#bofang").removeClass("layui-icon layui-icon-play").addClass("layui-icon layui-icon-pause");
                          tag = true;
                          layer.close(pause);
                      });

                      //setimeout计时
                      function f1() {
                          var s = $("#h1").val();
                          return s;
                      }
                  });
                  //关闭窗口
                  $("#tingzhi").click(function () {
                      var wname = window.name;
                      var index = parent.layer.getFrameIndex(wname);
                      parent.layer.close(index);
                  })
              }*/

         /*   table.render({
                elem: '#workTable'
                , url: '/cement/findAll4.do'
                , skin: 'nob'//样式格式
                , size: 'sm'//小型表格
                // , toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板

                // , totalRow: true
                , title: '历史状态'
                , cols: [[
                    {title: '序号', align: 'center', type: 'numbers'}

                    // , {field: 'id', title: 'ID', width: 80, fixed: 'left', unresize: true, sort: true}
                    , {field: 'device_code', title: '设备编号', hide: true, width: 120, edit: 'text', align: "center"}
                    , {field: 'pile_driver_num', title: '桩机号', hide: true, width: 120, edit: 'text', align: "center"}
                    , {field: 'stake_mark', title: '桩号', width: 100, edit: 'text', align: "center"}
                    , {
                        field: 'start_date',
                        align: "center",
                        title: '开始时间',
                        width: 180,
                        edit: 'text',
                        templet: "<div>{{layui.util.toDateString(d.start_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                    }
                    , {
                        field: 'end_date',
                        align: "center",
                        title: '结束时间',
                        width: 180,
                        edit: 'text',
                        templet: "<div>{{layui.util.toDateString(d.end_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                    }

                    , {field: 'pile_length', title: '施工桩长(m)', width: 100, edit: 'text', align: "center"}
                    , {field: 'au_aol', title: '累计灰量', width: 120, edit: 'text', align: "center"}
                    , {field: 'au_aoc', title: '累计浆量', width: 120, edit: 'text', align: "center"}
                    , {field: 'cjsd', title: '初搅深度', width: 120, hide: true, edit: 'text', align: "center"}

                    , {field: 'fjsd', title: '复搅深度', width: 120, hide: true, edit: 'text', align: "center"}
                    , {field: 'water_cement_ratio', title: '水灰比', hide: true, width: 120, edit: 'text', align: "center"}
                    , {field: 'rih_av', title: '平均下钻速度', width: 120, edit: 'text', align: "center"}
                    , {field: 'to_drill_av', title: '平均提钻速度', width: 120, edit: 'text', align: "center"}
                    , {
                        field: 'average_aoc',
                        title: '平均浆量',
                        hide: true,
                        width: 120,
                        hide: true,
                        edit: 'text',
                        align: "center"
                    }
                    , {field: 'average_aol', title: '平均灰量', width: 100, edit: 'text', align: "center"}
                    , {field: 'average_current', title: '平均电流', hide: true, width: 120, edit: 'text', align: "center"}
                    , {field: 'zdzs', title: '最大钻速', width: 120, hide: true, edit: 'text', align: "center"}

                ]],
                done: function (res, curr, count) {
                    // console.log(res.totalPileLength)
                    //然后把值写上去td[data-field="itemNo" 定义在哪个列后显示checkbox
                    $('th').css({'background-color': '#5792c6', 'color': '#fff', 'font-weight': 'bold'})
                    this.elem.next().find('.layui-table-total td[data-field="checkbox"] .layui-table-cell').text("合计");
                    this.elem.next().find('.layui-table-total td[data-field="stake_mark"] .layui-table-cell').text(res.totalPiles);
                    this.elem.next().find('.layui-table-total td[data-field="pile_length"] .layui-table-cell').text(res.totalPileLength);
                    this.elem.next().find('.layui-table-total td[data-field="au_aoc"] .layui-table-cell').text(res.sumAoc);
                    this.elem.next().find('.layui-table-total td[data-field="au_aol"] .layui-table-cell').text(res.sumAol);
                    // $('.layui-table-fixed-r').removeClass('layui-hide');
                }
                , page: true
                , id: 'workTableReload'
            });


            table.render({
                elem: '#timeStateTable'
                , url: '/cement/findAll4.do'
                , skin: 'nob'//样式格式
                , size: 'sm'//小型表格
                // , toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板

                // , totalRow: true
                , title: '历史状态'
                , cols: [[
                    {title: '序号', align: 'center', type: 'numbers'}

                    // , {field: 'id', title: 'ID', width: 80, fixed: 'left', unresize: true, sort: true}
                    , {field: 'device_code', title: '设备编号', hide: true, width: 120, edit: 'text', align: "center"}
                    , {field: 'pile_driver_num', title: '桩机号', hide: true, width: 120, edit: 'text', align: "center"}
                    , {field: 'stake_mark', title: '桩号', width: 100, edit: 'text', align: "center"}
                    , {
                        field: 'start_date',
                        align: "center",
                        title: '开始时间',
                        width: 180,
                        edit: 'text',
                        templet: "<div>{{layui.util.toDateString(d.start_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                    }
                    , {
                        field: 'end_date',
                        align: "center",
                        title: '结束时间',
                        width: 180,
                        edit: 'text',
                        templet: "<div>{{layui.util.toDateString(d.end_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                    }

                    , {field: 'pile_length', title: '施工桩长(m)', width: 100, edit: 'text', align: "center"}
                    , {field: 'au_aol', title: '累计灰量', width: 120, edit: 'text', align: "center"}
                    , {field: 'au_aoc', title: '累计浆量', width: 120, edit: 'text', align: "center"}
                    , {field: 'cjsd', title: '初搅深度', width: 120, hide: true, edit: 'text', align: "center"}

                    , {field: 'fjsd', title: '复搅深度', width: 120, hide: true, edit: 'text', align: "center"}
                    , {field: 'water_cement_ratio', title: '水灰比', hide: true, width: 120, edit: 'text', align: "center"}
                    , {field: 'rih_av', title: '平均下钻速度', width: 120, edit: 'text', align: "center"}
                    , {field: 'to_drill_av', title: '平均提钻速度', width: 120, edit: 'text', align: "center"}
                    , {
                        field: 'average_aoc',
                        title: '平均浆量',
                        hide: true,
                        width: 120,
                        hide: true,
                        edit: 'text',
                        align: "center"
                    }
                    , {field: 'average_aol', title: '平均灰量', width: 100, edit: 'text', align: "center"}
                    , {field: 'average_current', title: '平均电流', hide: true, width: 120, edit: 'text', align: "center"}
                    , {field: 'zdzs', title: '最大钻速', width: 120, hide: true, edit: 'text', align: "center"}

                ]],
                done: function (res, curr, count) {
                    // console.log(res.totalPileLength)
                    //然后把值写上去td[data-field="itemNo" 定义在哪个列后显示checkbox
                    this.elem.next().find('.layui-table-total td[data-field="checkbox"] .layui-table-cell').text("合计");
                    this.elem.next().find('.layui-table-total td[data-field="stake_mark"] .layui-table-cell').text(res.totalPiles);
                    this.elem.next().find('.layui-table-total td[data-field="pile_length"] .layui-table-cell').text(res.totalPileLength);
                    this.elem.next().find('.layui-table-total td[data-field="au_aoc"] .layui-table-cell').text(res.sumAoc);
                    this.elem.next().find('.layui-table-total td[data-field="au_aol"] .layui-table-cell').text(res.sumAol);
                    // $('.layui-table-fixed-r').removeClass('layui-hide');
                }
                , page: true
                , id: 'timeStateTableReload'
            });


            table.render({
                elem: '#historyStateTable'
                , url: '/cement/findAll3.do'
                , skin: 'nob'//样式格式
                , size: 'sm'//小型表格
                // , toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板

                // , totalRow: true
                , title: '历史状态'
                , cols: [[
                    {title: '序号', align: 'center', type: 'numbers'}

                    // , {field: 'id', title: 'ID', width: 80, fixed: 'left', unresize: true, sort: true}
                    , {field: 'device_code', title: '设备编号', hide: true, width: 120, edit: 'text', align: "center"}
                    , {field: 'pile_driver_num', title: '桩机号', hide: true, width: 120, edit: 'text', align: "center"}
                    , {field: 'stake_mark', title: '桩号', width: 100, edit: 'text', align: "center"}
                    , {
                        field: 'start_date',
                        align: "center",
                        title: '开始时间',
                        width: 180,
                        edit: 'text',
                        templet: "<div>{{layui.util.toDateString(d.start_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                    }
                    , {
                        field: 'end_date',
                        align: "center",
                        title: '结束时间',
                        width: 180,
                        edit: 'text',
                        templet: "<div>{{layui.util.toDateString(d.end_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                    }

                    , {field: 'pile_length', title: '施工桩长(m)', width: 100, edit: 'text', align: "center"}
                    , {field: 'au_aol', title: '累计灰量', width: 120, edit: 'text', align: "center"}
                    , {field: 'au_aoc', title: '累计浆量', width: 120, edit: 'text', align: "center"}
                    , {field: 'cjsd', title: '初搅深度', width: 120, hide: true, edit: 'text', align: "center"}

                    , {field: 'fjsd', title: '复搅深度', width: 120, hide: true, edit: 'text', align: "center"}
                    , {field: 'water_cement_ratio', title: '水灰比', hide: true, width: 120, edit: 'text', align: "center"}
                    , {field: 'rih_av', title: '平均下钻速度', width: 120, edit: 'text', align: "center"}
                    , {field: 'to_drill_av', title: '平均提钻速度', width: 120, edit: 'text', align: "center"}
                    , {
                        field: 'average_aoc',
                        title: '平均浆量',
                        hide: true,
                        width: 120,
                        hide: true,
                        edit: 'text',
                        align: "center"
                    }
                    , {field: 'average_aol', title: '平均灰量', width: 100, edit: 'text', align: "center"}
                    , {field: 'average_current', title: '平均电流', hide: true, width: 120, edit: 'text', align: "center"}
                    , {field: 'zdzs', title: '最大钻速', width: 120, hide: true, edit: 'text', align: "center"}

                ]],
                done: function (res, curr, count) {
                    // console.log(res.totalPileLength)
                    //然后把值写上去td[data-field="itemNo" 定义在哪个列后显示checkbox
                    this.elem.next().find('.layui-table-total td[data-field="checkbox"] .layui-table-cell').text("合计");
                    this.elem.next().find('.layui-table-total td[data-field="stake_mark"] .layui-table-cell').text(res.totalPiles);
                    this.elem.next().find('.layui-table-total td[data-field="pile_length"] .layui-table-cell').text(res.totalPileLength);
                    this.elem.next().find('.layui-table-total td[data-field="au_aoc"] .layui-table-cell').text(res.sumAoc);
                    this.elem.next().find('.layui-table-total td[data-field="au_aol"] .layui-table-cell').text(res.sumAol);
                    // $('.layui-table-fixed-r').removeClass('layui-hide');
                }
                , page: true
                , id: 'historyStateTableReload'
            });
*/
            /*            table.render({
                            elem: '#warningTable'
                            , url: '/cement/findAll2.do'
                            , skin: 'nob'//样式格式
                            , size: 'sm'//小型表格
                            // , toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板

                            // , totalRow: true
                            , title: '历史报警'
                            , cols: [[
                                {title: '序号', align: 'center', type: 'numbers'}

                                // , {field: 'id', title: 'ID', width: 80, fixed: 'left', unresize: true, sort: true}
                                , {field: 'device_code', title: '设备编号', hide: true, width: 120, edit: 'text', align: "center"}
                                , {field: 'pile_driver_num', title: '桩机号', hide: true, width: 120, edit: 'text', align: "center"}
                                , {field: 'stake_mark', title: '桩号', width: 100, edit: 'text', align: "center"}
                                , {
                                    field: 'start_date',
                                    align: "center",
                                    title: '开始时间',
                                    width: 180,
                                    edit: 'text',
                                    templet: "<div>{{layui.util.toDateString(d.start_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                                }
                                , {
                                    field: 'end_date',
                                    align: "center",
                                    title: '结束时间',
                                    width: 180,
                                    edit: 'text',
                                    templet: "<div>{{layui.util.toDateString(d.end_date, 'yyyy年-MM月-dd日 HH:mm:ss')}}</div>"
                                }

                                , {field: 'pile_length', title: '施工桩长(m)', width: 100, edit: 'text', align: "center"}
                                , {field: 'au_aol', title: '累计灰量', width: 120, edit: 'text', align: "center"}
                                , {field: 'au_aoc', title: '累计浆量', width: 120, edit: 'text', align: "center"}
                                , {field: 'cjsd', title: '初搅深度', width: 120, hide: true, edit: 'text', align: "center"}

                                , {field: 'fjsd', title: '复搅深度', width: 120, hide: true, edit: 'text', align: "center"}
                                , {field: 'water_cement_ratio', title: '水灰比', hide: true, width: 120, edit: 'text', align: "center"}
                                , {field: 'rih_av', title: '平均下钻速度', width: 120, edit: 'text', align: "center"}
                                , {field: 'to_drill_av', title: '平均提钻速度', width: 120, edit: 'text', align: "center"}
                                , {
                                    field: 'average_aoc',
                                    title: '平均浆量',
                                    hide: true,
                                    width: 120,
                                    hide: true,
                                    edit: 'text',
                                    align: "center"
                                }
                                , {field: 'average_aol', title: '平均灰量', width: 100, edit: 'text', align: "center"}
                                , {field: 'average_current', title: '平均电流', hide: true, width: 120, edit: 'text', align: "center"}
                                , {field: 'zdzs', title: '最大钻速', width: 120, hide: true, edit: 'text', align: "center"}

                            ]],
                            done: function (res, curr, count) {
                                // console.log(res.totalPileLength)
                                //然后把值写上去td[data-field="itemNo" 定义在哪个列后显示checkbox
                                this.elem.next().find('.layui-table-total td[data-field="checkbox"] .layui-table-cell').text("合计");
                                this.elem.next().find('.layui-table-total td[data-field="stake_mark"] .layui-table-cell').text(res.totalPiles);
                                this.elem.next().find('.layui-table-total td[data-field="pile_length"] .layui-table-cell').text(res.totalPileLength);
                                this.elem.next().find('.layui-table-total td[data-field="au_aoc"] .layui-table-cell').text(res.sumAoc);
                                this.elem.next().find('.layui-table-total td[data-field="au_aol"] .layui-table-cell').text(res.sumAol);
                                // $('.layui-table-fixed-r').removeClass('layui-hide');
                            }
                            , page: true
                            , id: 'warningReload'
                        });*/
            //历史数据表格
            /*           //触发事件
                       //获取hash来切换选项卡，假设当前地址的hash为lay-id对应的值
                       var layid = location.hash.replace(/^#tab-all=/, '');
                       element.tabChange('tab-all', layid); //假设当前地址为：http://a.com#test1=222，那么选项卡会自动切换到“发送消息”这一项

                       //监听Tab切换，以改变地址hash值
                       element.on('tab(tab-all)', function () {
                           // location.hash = 'test1='+ this.getAttribute('lay-id');
                           var testid = $(this).attr("lay-id");
                           location.hash = 'type=' + testid;
                       });*/


        })
    }


    function toDetailsValue() {
        return details;
    }

    function toPlaybackValue() {
        return playback;
    }

</script>
</html>
